package com.richman.view;

import javax.swing.JPanel;
import javax.swing.JTextField;

import com.richman.controller.NegativeRatioClient;
import com.richman.utils.Common;

import javax.swing.JLabel;
import javax.swing.JOptionPane;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;

public class SettingPane extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = -9999999L;

	/**
	 * Create the panel.
	 */
	
	private JComboBox comboBox;
	
	private String second = "6秒";
	

	private JTextField sideMinTextField;
	private JTextField sumMinTextField;
	
	//ps38金额设置
	private JTextField hgPs38RQAmountTextField; 
	private JTextField ps38RQPercentTextField;
	private JTextField ps38RQAmountTextField;

	
	private JTextField hgPs38DXAmountTextField;
	private JTextField ps38DXPercentTextField;
	private JTextField ps38DXAmountTextField;
	
	//isn金额设置
	private JTextField hgISNRQAmountTextField; 
	private JTextField isnRQPercentTextField;
	private JTextField isnRQAmountTextField;

	
	private JTextField hgISNDXAmountTextField;
	private JTextField isnDXPercentTextField;
	private JTextField isnDXAmountTextField;

	
	private JTextField hgMaxBetTextField;
	private JTextField sideMaxTextField;
	private JTextField sumMaxTextField;
	private JTextField betoddTextField;
	
	private JTextField reBetTimeTextField;
	
	private JTextField delayBetTimeTextField;
	
	private JTextField refreshDelayBetTimeTextField;
	
	private JTextField manualBetSuccessTimeTextField;
	
	private JTextField maxdvalueTextField;
	
	private JTextField dvaluelimitTextField;
	
	private JTextField specialMinRatioTextField;
	
	private JTextField specialSecondMinRatioTextField;
	
	private JTextField specialDXQMinRatioTextField;
	
	private JTextField emailRQDvalueTextField;
	
	private JTextField emailDQDvalueTextField;
	
	private JTextField emailXQDvalueTextField;
	
	private JTextField beforeGameTimeFilterTextField;
	
	private JTextField specialBetAmountTextField;
	
	private JTextField specialSecondBetAmountTextField;
	
	private JTextField specialDXQBetAmountTextField;
	
	private JTextField specialBetIntervalTextField;
	
	private JTextField specialDXQMinBetTextField;
	
	private JTextField receiveDataIntervalField;
	private JTextField receiveDataIntervalField1;
	
	private JTextField betlimitField;
	
	private JTextField startBetGoldField;
	
	private JTextField startBetGoldFieldHg;
	
	private JTextField dxStartBetGoldFieldHg;
	
	private JTextField forbidTimeStTextField;
	private JTextField forbidTimeEdTextField;
	
	private JTextField betDownGoldTextField;
	
	double specialMinRatio = 0.8;
	double specialSecondMinRatio = 0.4;
	
	int beforeGameTimeFilter = 60;
	
	int betDownGold = 1000;
	
	double specialDXQMinRatio = 0.8;
	
	int specialBetAmount = 100000;
	
	int specialSecondBetAmount = 20000;
	
	int specialDXQBetAmount = 10000;
	
	int specialBetInterval = 30;
	
	int specialDXQMinBet = 10;
	
	int forbidTimest = 0;
	int forbidTimeed = 0;
	
	private double sideMinodd = 0.0;
	private double sumMinodd = 0.0;
	
	private double sideMaxodd = 0.0;
	private double sumMaxodd = 0.0;
	
	double maxdvalue = 0.0;
	
	int dvaluelimit = 1;
	
	int emailRQDvalue = 1;
	int emailDQDvalue = 1;
	
	int emailXQDvalue = 1;
	
	int receiveDataInterval = 10;
	
	int notsamematchReceiveDataInterval = 10;
	
	int rebettime = 30;
	
	int delaybettime = 0;
	
	int refreshdelaybettime = 0;
	
	int betcountLimit = 1;
	
	int startBetGold = 0;
	
	int startBetGoldHg = 0;
	int dxStartBetGoldHg = 0;
	
	int hgmaxbet = 100000;
	
	//2021/2/17加
	private JTextField danshiMaxTimeField;
	private int danshiMaxTime = 0;
	
	
	private int danshiMinTime = 0;
	private JTextField danshiMinTimeField;
	
	private JTextField limitPercentField;
	
	private int limitPercent = 75;
	
	public double getmaxdvalue() {
		return maxdvalue;
	}
	
	public double getLimitPercent() {
		return 1.0*limitPercent/100;
	}
	
	public int getdvaluelimit() {
		return dvaluelimit;
	}
	
	public int getemailRQDvalue() {
		return emailRQDvalue;
	}
	
	public int getemailDQDvalue() {
		return emailDQDvalue;
	}
	
	public int getemailXQDvalue() {
		return emailXQDvalue;
	}
	
	public int getbeforeGameTimeFilter() {
		return beforeGameTimeFilter;
	}
	
	public int getBetDownGold() {
		return betDownGold;
	}
	
	public double getSpecialMinRatio() {
		return specialMinRatio;
	}
	
	public double getSpecialSecondMinRatio() {
		return specialSecondMinRatio;
	}
	

	public double getSpecialDXQMinRatio() {
		return specialDXQMinRatio;
	}

	
	public int getSpecialBetAmount() {
		return specialBetAmount;
	}

	public int getSpecialSecondBetAmount() {
		return specialSecondBetAmount;
	}

	
	public int getSpecialDXQBetAmount() {
		return specialDXQBetAmount;
	}
	
	public int getspecialBetInterval(){
		return specialBetInterval;
	}
	
	public int getspecialDXQMinBet() {
		return specialDXQMinBet;
	}
	
	public int getReceiveDataInterval() {
		return receiveDataInterval;
	}

	public int getnotsamematchReceiveDataInterval() {
		return notsamematchReceiveDataInterval;
	}
	
	public int getbetcountLimit() {
		return betcountLimit;
	}
	
	public int getstartBetGold() {
		return startBetGold;
	}
	
	public int getstartBetGoldHg() {
		return startBetGoldHg;
	}
	
	public int getDxStartBetGoldHg() {
		return dxStartBetGoldHg;
	}

	public void setReceiveDataInterval(int receiveDataInterval) {
		this.receiveDataInterval = receiveDataInterval;
	}

	private int hgPS38RQBetAmount = 0;
	private double ps38RQAmount = 300;
	private double ps38RQPercent = 0.1;
	
	private int hgPS38DXBetAmount = 0;
	private double ps38DXAmount = 300;
	private double ps38DXPercent = 0.1;
	
	private boolean bps38RQBetAmount = false;
	
	private boolean bps38DXBetAmount = false;
	
	
	private int hgISNRQBetAmount = 0;
	private double isnRQAmount = 300;
	private double isnRQPercent = 0.1;
	
	private int hgISNDXBetAmount = 0;
	private double isnDXAmount = 300;
	private double isnDXPercent = 0.1;
	
	private boolean bISNRQBetAmount = false;

	private boolean bISNDXBetAmount = false;
	

	public boolean isbISNRQBetAmount() {
		return bISNRQBetAmount;
	}

	public void setbISNRQBetAmount(boolean bISNRQBetAmount) {
		this.bISNRQBetAmount = bISNRQBetAmount;
	}

	public boolean isbISNDXBetAmount() {
		return bISNDXBetAmount;
	}

	public void setbISNDXBetAmount(boolean bISNDXBetAmount) {
		this.bISNDXBetAmount = bISNDXBetAmount;
	}
	


	
	
	private double betodd = 0.0;
	
	
	private boolean bmatchFilter = false;
	
	private boolean autoBet = false;
	
	private boolean betHalf = true;
	private boolean betWhole = true;
	
	private boolean ignoreWarn = false;
	
	private boolean betDown = false;
	
	JCheckBox autoBetCheckBox = null;
	JCheckBox matchFilterCheckBox = null;
	
	JCheckBox ps38RQBetAmountCheckBox = null;
	
	JCheckBox ps38DXBetAmountCheckBox = null;
	
	JCheckBox isnRQBetAmountCheckBox = null;
	
	JCheckBox isnDXBetAmountCheckBox = null;
	
	JCheckBox betdanshiCheckBox = null;
	JCheckBox betrunningCheckBox = null;
	
	JCheckBox betpankouCheckBox = null;
	JCheckBox betdqCheckBox = null;
	
	JCheckBox betxqCheckBox = null;
	
	private boolean bbetdanshi = true;
	private boolean bbetrunning = true;
	
	private boolean bbetpankou = true;
	private boolean bbetdq = true;
	
	//private boolean bbetdq = true;
	private boolean bbetxq = true;
	
	JCheckBox betHalfCheckBox = null;
	JCheckBox betWholeCheckBox = null;
	
	JCheckBox ignoreWarnCheckBox = null;
	
	JCheckBox betDownCheckBox = null;
	
	int manualBetSuccessTime = 10;
	
	public int getmanualBetSuccessTime() {
		return manualBetSuccessTime;
	}
	
	public boolean getBetHalf() {
		return false;
	}
	
	public int gethgmaxbet() {
		return hgmaxbet;
	}
	
	public boolean getBetWhole() {
		return betWhole;
	}
	
	public boolean getIgnoreWarn() {
		return ignoreWarn;
	}
	
	public boolean getBetDown() {
		return betDown;
	}
	
	
	public double getsideMin() {
		return sideMinodd;
	}
	
	public double getsumMin() {
		return sumMinodd;
	}
	
	
	public double getsideMax() {
		return sideMaxodd;
	}
	
	public double getsumMax() {
		return sumMaxodd;
	}
	
	public int getforbidst() {
		return forbidTimest;
	}
	
	public int getforbided() {
		return forbidTimeed;
	}
	
	public boolean getbetpankou() {
		return bbetpankou;
	}
	
	public boolean getbetdq() {
		return bbetdq;
	}
	

	
	public boolean getbetxq() {
		return bbetxq;
	}
	
	public int getDanshiMaxTime() {
		return danshiMaxTime;
	}
	
	public int getDanshiMinTime() {
		return danshiMinTime;
	}
	
	public SettingPane() {
		setLayout(null);

		JLabel sideLb = new JLabel("过滤赔率低于");
		sideLb.setBounds(10, 171, 97, 26);
		//add(sideLb);
		
		sideMinTextField = new JTextField();
		sideMinTextField.setBounds(110, 171, 66, 21);
		//add(sideMinTextField);
		sideMinTextField.setColumns(10);
		
		JLabel sumLb = new JLabel("过滤对比赔率低于");
		sumLb.setBounds(227, 171, 122, 26);
		//add(sumLb);
		
		sumMinTextField = new JTextField();
		sumMinTextField.setColumns(10);
		sumMinTextField.setBounds(359, 171, 66, 21);
		//add(sumMinTextField);
		

		
		JLabel forbidlb = new JLabel("禁止投注时间");
		forbidlb.setBounds(550, 171, 122, 26);
		//add(forbidlb);
		
		forbidTimeStTextField = new JTextField();
		forbidTimeStTextField.setColumns(10);
		forbidTimeStTextField.setBounds(650, 171, 66, 21);
		//add(forbidTimeStTextField);
		
		
		JLabel forbidlb1 = new JLabel("至");
		forbidlb1.setBounds(720, 171, 30, 26);
		//add(forbidlb1);
		
		forbidTimeEdTextField = new JTextField();
		forbidTimeEdTextField.setColumns(10);
		forbidTimeEdTextField.setBounds(750, 171, 66, 21);
		//add(forbidTimeEdTextField);		
		
		

		
		JLabel label = new JLabel("过滤赔率高于");
		label.setBounds(10, 220, 97, 26);
		//add(label);
		
		sideMaxTextField = new JTextField();
		sideMaxTextField.setColumns(10);
		sideMaxTextField.setBounds(110, 220, 66, 21);
		//add(sideMaxTextField);
		
		JLabel label_1 = new JLabel("过滤对比赔率高于");
		label_1.setBounds(227, 220, 122, 26);
		//add(label_1);
		
		sumMaxTextField = new JTextField();
		sumMaxTextField.setColumns(10);
		sumMaxTextField.setBounds(359, 220, 66, 21);
		//add(sumMaxTextField);
		
		
		
		betdanshiCheckBox = new JCheckBox("投单式");
		betdanshiCheckBox.setBounds(459, 220, 100, 23);
		//add(betdanshiCheckBox);

		

		betrunningCheckBox = new JCheckBox("投滚球");
		betrunningCheckBox.setBounds(559, 220, 100, 23);
		//add(betrunningCheckBox);

		
		
		
		
		betpankouCheckBox = new JCheckBox("投让球");
		betpankouCheckBox.setBounds(659, 220, 100, 23);
		//add(betpankouCheckBox);

		

		betdqCheckBox = new JCheckBox("投大球");
		betdqCheckBox.setBounds(759, 220, 100, 23);
		//add(betdqCheckBox);
		
		
		betxqCheckBox = new JCheckBox("投小球");
		betxqCheckBox.setBounds(859, 220, 100, 23);
		//add(betxqCheckBox);
		
		
		//ps38投注金额设置区域  第一行
		JLabel ps38WholeAmountLabel = new JLabel("ps38设置：");
		ps38WholeAmountLabel.setBounds(10, 0, 97, 26);
		//add(ps38WholeAmountLabel);
		
		JLabel hgPs38RQAmountLabel = new JLabel("皇冠让球金额：");
		hgPs38RQAmountLabel.setBounds(97, 0, 100, 26);
		//add(hgPs38RQAmountLabel);
		
		hgPs38RQAmountTextField = new JTextField();
		hgPs38RQAmountTextField.setColumns(10);
		hgPs38RQAmountTextField.setBounds(200, 0, 66, 21);
		//add(hgPs38RQAmountTextField);
		
		

		
		JLabel ps38RQPercentLabel = new JLabel("ps38让球比例：");
		ps38RQPercentLabel.setBounds(270, 0, 97, 26);
		//add(ps38RQPercentLabel);
		
		ps38RQPercentTextField = new JTextField();
		ps38RQPercentTextField.setColumns(10);
		ps38RQPercentTextField.setBounds(370, 0, 66, 21);
		//add(ps38RQPercentTextField);

		JLabel ps38AmountLabel = new JLabel("ps38让球金额：");
		ps38AmountLabel.setBounds(470, 0, 97, 26);
		//add(ps38AmountLabel);
		
		ps38RQAmountTextField = new JTextField();
		ps38RQAmountTextField.setColumns(10);
		ps38RQAmountTextField.setBounds(570, 0, 66, 21);
		//add(ps38RQAmountTextField);
		
		ps38RQBetAmountCheckBox = new JCheckBox("PS38让球按固定金额投注");
		ps38RQBetAmountCheckBox.setBounds(640, 0, 200, 23);
		//add(ps38RQBetAmountCheckBox);
		
		
		JLabel Label = new JLabel("皇冠最大投注：");
		Label.setBounds(427, 82, 97, 26);
		////add(Label);
		
		hgMaxBetTextField = new JTextField();
		hgMaxBetTextField.setColumns(10);
		hgMaxBetTextField.setBounds(518, 85, 66, 21);
		////add(hgMaxBetTextField);		
		//ps38投注金额设置区域  第二行
		JLabel hgPs38DXAmountLabel = new JLabel("投注大小金额：");
		hgPs38DXAmountLabel.setBounds(10, 26, 100, 26);
		add(hgPs38DXAmountLabel);
		
		hgPs38DXAmountTextField = new JTextField();
		hgPs38DXAmountTextField.setColumns(10);
		hgPs38DXAmountTextField.setBounds(110, 26, 66, 21);
		add(hgPs38DXAmountTextField);
		
		

		
		JLabel ps38DXPercentLabel = new JLabel("ps38大小比例：");
		ps38DXPercentLabel.setBounds(270, 26, 97, 26);
		//add(ps38DXPercentLabel);
		
		ps38DXPercentTextField = new JTextField();
		ps38DXPercentTextField.setColumns(10);
		ps38DXPercentTextField.setBounds(370, 26, 66, 21);
		//add(ps38DXPercentTextField);

		JLabel ps38DXAmountLabel = new JLabel("ps38大小金额：");
		ps38DXAmountLabel.setBounds(470, 26, 97, 26);
		//add(ps38DXAmountLabel);
		
		ps38DXAmountTextField = new JTextField();
		ps38DXAmountTextField.setColumns(10);
		ps38DXAmountTextField.setBounds(570, 26, 66, 21);
		//add(ps38DXAmountTextField);
		
		ps38DXBetAmountCheckBox = new JCheckBox("PS38大小按固定金额投注");
		ps38DXBetAmountCheckBox.setBounds(640, 26, 200, 23);
		//add(ps38DXBetAmountCheckBox);
		
		
		
		
		
		//智博金额设置区域  第一行
		JLabel isnWholeAmountLabel = new JLabel("isn设置：");
		isnWholeAmountLabel.setBounds(10, 52, 97, 26);
		//add(isnWholeAmountLabel);
		
		JLabel hgISNRQAmountLabel = new JLabel("皇冠让球金额：");
		hgISNRQAmountLabel.setBounds(97, 52, 100, 26);
		//add(hgISNRQAmountLabel);
		
		hgISNRQAmountTextField = new JTextField();
		hgISNRQAmountTextField.setColumns(10);
		hgISNRQAmountTextField.setBounds(200, 52, 66, 21);
		//add(hgISNRQAmountTextField);
		
		

		
		JLabel isnRQPercentLabel = new JLabel("isn让球比例：");
		isnRQPercentLabel.setBounds(270, 52, 97, 26);
		//add(isnRQPercentLabel);
		
		isnRQPercentTextField = new JTextField();
		isnRQPercentTextField.setColumns(10);
		isnRQPercentTextField.setBounds(370, 52, 66, 21);
		//add(isnRQPercentTextField);

		JLabel isnAmountLabel = new JLabel("isn让球金额：");
		isnAmountLabel.setBounds(470, 52, 97, 26);
		//add(isnAmountLabel);
		
		isnRQAmountTextField = new JTextField();
		isnRQAmountTextField.setColumns(10);
		isnRQAmountTextField.setBounds(570, 52, 66, 21);
		//add(isnRQAmountTextField);
		
		isnRQBetAmountCheckBox = new JCheckBox("isn让球按固定金额投注");
		isnRQBetAmountCheckBox.setBounds(640, 52, 200, 23);
		//add(isnRQBetAmountCheckBox);
		
		
		
		//ps38投注金额设置区域  第二行
		JLabel hgISNDXAmountLabel = new JLabel("皇冠大小金额：");
		hgISNDXAmountLabel.setBounds(97, 78, 100, 26);
		//add(hgISNDXAmountLabel);
		
		hgISNDXAmountTextField = new JTextField();
		hgISNDXAmountTextField.setColumns(10);
		hgISNDXAmountTextField.setBounds(200, 78, 66, 21);
		//add(hgISNDXAmountTextField);
		
		

		
		JLabel isnDXPercentLabel = new JLabel("isn大小比例：");
		isnDXPercentLabel.setBounds(270, 78, 97, 26);
		//add(isnDXPercentLabel);
		
		isnDXPercentTextField = new JTextField();
		isnDXPercentTextField.setColumns(10);
		isnDXPercentTextField.setBounds(370, 78, 66, 21);
		//add(isnDXPercentTextField);

		JLabel isnDXAmountLabel = new JLabel("isn大小金额：");
		isnDXAmountLabel.setBounds(470, 78, 97, 26);
		//add(isnDXAmountLabel);
		
		isnDXAmountTextField = new JTextField();
		isnDXAmountTextField.setColumns(10);
		isnDXAmountTextField.setBounds(570, 78, 66, 21);
		//add(isnDXAmountTextField);
		
		isnDXBetAmountCheckBox = new JCheckBox("isn大小按固定金额投注");
		isnDXBetAmountCheckBox.setBounds(640, 78, 200, 23);
		//add(isnDXBetAmountCheckBox);
		
		//金额区域设置完毕
		
		
		
		
		
		
		

		

		
		JLabel hgintervalLabel = new JLabel("同场次收数据间隔(秒)");
		hgintervalLabel.setBounds(10, 112, 150, 26);
		//add(hgintervalLabel);
		
		receiveDataIntervalField = new JTextField();
		receiveDataIntervalField.setColumns(10);
		receiveDataIntervalField.setBounds(150, 115, 66, 21);
		//add(receiveDataIntervalField);
		
		
		
		JLabel hgintervalLabel1 = new JLabel("不同场次收数据间隔(秒)");
		hgintervalLabel1.setBounds(230, 112, 150, 26);
		//add(hgintervalLabel1);
		
		receiveDataIntervalField1 = new JTextField();
		receiveDataIntervalField1.setColumns(10);
		receiveDataIntervalField1.setBounds(370, 115, 66, 21);
		//add(receiveDataIntervalField1);
		
		
		
		
		
		JLabel label111 = new JLabel("手数限制");
		label111.setBounds(470, 112, 150, 26);
		//add(label111);
		
		betlimitField = new JTextField();
		betlimitField.setColumns(10);
		betlimitField.setBounds(570, 115, 66, 21);
		//add(betlimitField);
		
		
		
		JLabel label11 = new JLabel("PS38起投金额");
		label11.setBounds(670, 112, 150, 26);
		//add(label11);
		
		startBetGoldField = new JTextField();
		startBetGoldField.setColumns(10);
		startBetGoldField.setBounds(770, 115, 66, 21);
		//add(startBetGoldField);
		
		
		JLabel labelhgstart = new JLabel("HG盘口起投金额");
		labelhgstart.setBounds(670, 142, 150, 26);
		//add(labelhgstart);
		
		startBetGoldFieldHg = new JTextField();
		startBetGoldFieldHg.setColumns(10);
		startBetGoldFieldHg.setBounds(770, 145, 66, 21);
		//add(startBetGoldFieldHg);
		
		
		
		
		JLabel labelhgdxstart = new JLabel("HG大小起投金额");
		labelhgdxstart.setBounds(470, 142, 150, 26);
		//add(labelhgdxstart);
		
		dxStartBetGoldFieldHg = new JTextField();
		dxStartBetGoldFieldHg.setColumns(10);
		dxStartBetGoldFieldHg.setBounds(570, 145, 66, 21);
		//add(dxStartBetGoldFieldHg);
		
		
		
		JLabel label_2 = new JLabel("最低赔率：");
		label_2.setBounds(10, 270, 97, 26);
		add(label_2);
		
		betoddTextField = new JTextField();
		betoddTextField.setColumns(10);
		betoddTextField.setBounds(78, 270, 66, 21);
		add(betoddTextField);
		

		
		JLabel label_3 = new JLabel("补单时间：");
		label_3.setBounds(200, 270, 97, 26);
		//add(label_3);
		
		reBetTimeTextField = new JTextField();
		reBetTimeTextField.setColumns(10);
		reBetTimeTextField.setBounds(278, 270, 66, 21);
		//add(reBetTimeTextField);
		
		
		JLabel label_4 = new JLabel("接受数据后投注延时");
		label_4.setBounds(360, 270, 150, 26);
		//add(label_4);
		
		delayBetTimeTextField = new JTextField();
		delayBetTimeTextField.setColumns(10);
		delayBetTimeTextField.setBounds(478, 270, 66, 21);
		//add(delayBetTimeTextField);
		
		
		
		
		JLabel label_5 = new JLabel("刷水后投注延(秒)");
		label_5.setBounds(578, 270, 130, 26);
		//add(label_5);
		
		refreshDelayBetTimeTextField = new JTextField();
		refreshDelayBetTimeTextField.setColumns(10);
		refreshDelayBetTimeTextField.setBounds(680, 270, 66, 21);
		//add(refreshDelayBetTimeTextField);
		
		
		
		
		JLabel label_6 = new JLabel("手动投注成功时间间隔(秒)");
		label_6.setBounds(578, 300, 160, 26);
		//add(label_6);
		
		manualBetSuccessTimeTextField = new JTextField();
		manualBetSuccessTimeTextField.setColumns(10);
		manualBetSuccessTimeTextField.setBounds(770, 300, 66, 21);
		//add(manualBetSuccessTimeTextField);
		
		
		//JPanel specialPane = new JPanel();
		////add(specialPane, BorderLayout.EAST);
		
		
		//special start 
		JLabel label_spe = new JLabel("特殊投注设置区域:");
		label_spe.setBounds(1000, 20, 120, 26);
		//add(label_spe);
		
		
		JLabel label_7 = new JLabel("盘口与初盘相差范围");
		label_7.setBounds(978, 50, 120, 26);
		//add(label_7);

		maxdvalueTextField = new JTextField();
		maxdvalueTextField.setColumns(10);
		maxdvalueTextField.setBounds(1100, 50, 66, 21);
		//add(maxdvalueTextField);
		
		
		
		
		JLabel label_8 = new JLabel("差值高亮手数");
		label_8.setBounds(978, 80, 100, 26);
		//add(label_8);
		
		dvaluelimitTextField = new JTextField();
		dvaluelimitTextField.setColumns(10);
		dvaluelimitTextField.setBounds(1078, 80, 66, 21);
		//add(dvaluelimitTextField);
		
		JLabel label_9 = new JLabel("让球投注最低水位");
		label_9.setBounds(978, 110, 120, 26);
		//add(label_9);
		
		specialMinRatioTextField = new JTextField();
		specialMinRatioTextField.setColumns(10);
		specialMinRatioTextField.setBounds(1098, 110, 66, 21);
		//add(specialMinRatioTextField);
		
		JLabel label_100 = new JLabel("让球投注金额");
		label_100.setBounds(978, 140, 120, 26);
		//add(label_100);
		
		specialBetAmountTextField = new JTextField();
		specialBetAmountTextField.setColumns(10);
		specialBetAmountTextField.setBounds(1098, 140, 66, 21);
		//add(specialBetAmountTextField);
		
		
		JLabel label_10 = new JLabel("第二手投注最低水位");
		label_10.setBounds(978, 170, 120, 26);
		//add(label_10);
		
		specialSecondMinRatioTextField = new JTextField();
		specialSecondMinRatioTextField.setColumns(10);
		specialSecondMinRatioTextField.setBounds(1098, 170, 66, 21);
		//add(specialSecondMinRatioTextField);
		
		
		JLabel label_11 = new JLabel("第二手投注金额");
		label_11.setBounds(978, 200, 120, 26);
		//add(label_11);
		
		specialSecondBetAmountTextField = new JTextField();
		specialSecondBetAmountTextField.setColumns(10);
		specialSecondBetAmountTextField.setBounds(1098, 200, 66, 21);
		//add(specialSecondBetAmountTextField);
		
		JLabel label_101 = new JLabel("特殊投注时间间隔");
		label_101.setBounds(978, 230, 120, 26);
		//add(label_101);
		
		specialBetIntervalTextField = new JTextField();
		specialBetIntervalTextField.setColumns(10);
		specialBetIntervalTextField.setBounds(1098, 230, 66, 21);
		//add(specialBetIntervalTextField);
		
		
		
		JLabel label_102 = new JLabel("大小球起投手数");
		label_102.setBounds(978, 260, 120, 26);
		//add(label_102);
		
		specialDXQMinBetTextField = new JTextField();
		specialDXQMinBetTextField.setColumns(10);
		specialDXQMinBetTextField.setBounds(1098, 260, 66, 21);
		//add(specialDXQMinBetTextField);
		
		
		
		JLabel label_103 = new JLabel("大小球投注金额");
		label_103.setBounds(978, 290, 120, 26);
		//add(label_103);
		
		
		specialDXQBetAmountTextField = new JTextField();
		specialDXQBetAmountTextField.setColumns(10);
		specialDXQBetAmountTextField.setBounds(1098, 290, 66, 21);
		//add(specialDXQBetAmountTextField);
		
		
		JLabel label_104 = new JLabel("大小球投注最低水位");
		label_104.setBounds(978, 320, 120, 26);
		//add(label_104);
		
		specialDXQMinRatioTextField = new JTextField();
		specialDXQMinRatioTextField.setColumns(10);
		specialDXQMinRatioTextField.setBounds(1098, 320, 66, 21);
		//add(specialDXQMinRatioTextField);

		
		
		JLabel labelRQEmail = new JLabel("让球邮件差值");
		labelRQEmail.setBounds(978, 350, 120, 26);
		//add(labelRQEmail);
		
		emailRQDvalueTextField = new JTextField();
		emailRQDvalueTextField.setColumns(10);
		emailRQDvalueTextField.setBounds(1098, 350, 66, 21);
		//add(emailRQDvalueTextField);
		
		
		
		JLabel labelDQEmail = new JLabel("大球邮件差值");
		labelDQEmail.setBounds(978, 380, 120, 26);
		//add(labelDQEmail);
		
		emailDQDvalueTextField = new JTextField();
		emailDQDvalueTextField.setColumns(10);
		emailDQDvalueTextField.setBounds(1098, 380, 66, 21);
		//add(emailDQDvalueTextField);
		
		JLabel labelXQEmail = new JLabel("小球邮件差值");
		labelXQEmail.setBounds(978, 410, 120, 26);
		//add(labelXQEmail);
		
		emailXQDvalueTextField = new JTextField();
		emailXQDvalueTextField.setColumns(10);
		emailXQDvalueTextField.setBounds(1098, 410, 66, 21);
		//add(emailXQDvalueTextField);
		
		JLabel labelBeforeGameTimeFilter = new JLabel("时间过滤(分钟)");
		labelBeforeGameTimeFilter.setBounds(978, 440, 120, 26);
		//add(labelBeforeGameTimeFilter);
		
		beforeGameTimeFilterTextField = new JTextField();
		beforeGameTimeFilterTextField.setColumns(10);
		beforeGameTimeFilterTextField.setBounds(1098, 440, 66, 21);
		//add(beforeGameTimeFilterTextField);
		//special end
		
		
		
		autoBetCheckBox = new JCheckBox("自动投注");
		autoBetCheckBox.setBounds(4, 330, 103, 23);
		//add(autoBetCheckBox);
		
		matchFilterCheckBox = new JCheckBox("过滤对头单");
		matchFilterCheckBox.setBounds(104, 330, 103, 23);
		//add(matchFilterCheckBox);
		
		
		
		betHalfCheckBox = new JCheckBox("投半场 ");
		betHalfCheckBox.setBounds(4, 390, 103, 23);
		//add(betHalfCheckBox);
		
		betWholeCheckBox = new JCheckBox("投全场");
		betWholeCheckBox.setBounds(104, 390, 103, 23);
		//add(betWholeCheckBox);
		
		ignoreWarnCheckBox = new JCheckBox("忽略非投警告 ");
		ignoreWarnCheckBox.setBounds(4, 450, 203, 23);
		//add(ignoreWarnCheckBox);
		
		
		betDownCheckBox = new JCheckBox("优先投下盘");
		betDownCheckBox.setBounds(4, 510, 100, 23);
		//add(betDownCheckBox);
		
		
		JLabel labelBetDownGold = new JLabel("下盘投注金额:");
		labelBetDownGold.setBounds(150, 510, 100, 26);
		//add(labelBetDownGold);
		
		betDownGoldTextField = new JTextField();
		betDownGoldTextField.setColumns(10);
		betDownGoldTextField.setBounds(255, 510, 80, 21);
		//add(betDownGoldTextField);		
		
		autoBetCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					autoBet = false;
				}else{
					autoBet = true;
				}
				
				
			}
        });
		
		
		betHalfCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					betHalf = false;
				}else{
					betHalf = true;
				}
				
				
			}
			
			
        });
		
		ignoreWarnCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					ignoreWarn = false;
				}else{
					ignoreWarn = true;
				}
				
				
			}
			
			
        });
		
		betDownCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					betDown = false;
				}else{
					betDown = true;
				}
				
				
			}
			
			
        });
		
		
		
		
		betWholeCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					betWhole = false;
				}else{
					betWhole = true;
				}
				
				
			}
        });
		
		
		ps38RQBetAmountCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					bps38RQBetAmount = false;
				}else{
					bps38RQBetAmount = true;
				}
				
				
			}
        });
		
		
		ps38DXBetAmountCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					bps38DXBetAmount = false;
				}else{
					bps38DXBetAmount = true;
				}
				
				
			}
        });
		
		
		
		
		isnRQBetAmountCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					bISNRQBetAmount = false;
				}else{
					bISNRQBetAmount = true;
				}
				
				
			}
        });
		
		
		isnDXBetAmountCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					bISNDXBetAmount = false;
				}else{
					bISNDXBetAmount = true;
				}
				
				
			}
        });
		
		
		
		
		
		
		
		
		
		
		
		betdanshiCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					bbetdanshi = false;
				}else{
					bbetdanshi = true;
				}
				
				
			}
        });
		
		betrunningCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					bbetrunning = false;
				}else{
					bbetrunning = true;
				}
				
				
			}
        });
		
		
		betpankouCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					bbetpankou = false;
				}else{
					bbetpankou = true;
				}
				
				
			}
        });
		
		
		
		betdqCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					bbetdq = false;
				}else{
					bbetdq = true;
				}
				
				
			}
        });
		
		
		betxqCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					bbetxq = false;
				}else{
					bbetxq = true;
				}
				
				
			}
        });
		
		
		
		matchFilterCheckBox.addItemListener(new ItemListener() {


			@Override
			public void itemStateChanged(ItemEvent e) {
				// TODO Auto-generated method stub
               // int index = jcb.getSelectedIndex();
				if(e.getStateChange() == ItemEvent.DESELECTED){
					bmatchFilter = false;
				}else{
					bmatchFilter = true;
				}
				
				
			}
        });
		
		
		JButton saveButton = new JButton("保存设置");
		saveButton.setBounds(295, 330, 145, 48);
		add(saveButton);
		
		JLabel label_44 = new JLabel("过滤单式开场高于(分)");
		label_44.setBounds(578, 330, 126, 26);
		//add(label_44);
		
		danshiMaxTimeField = new JTextField();
		danshiMaxTimeField.setColumns(10);
		danshiMaxTimeField.setBounds(720, 330, 66, 21);
		//add(danshiMaxTimeField);
		
		
		JLabel label_33 = new JLabel("过滤单式开场低于(分)");
		label_33.setBounds(578, 370, 126, 26);
		//add(label_33);
		
		danshiMinTimeField = new JTextField();
		danshiMinTimeField.setColumns(10);
		danshiMinTimeField.setBounds(720, 370, 66, 21);
		//add(danshiMinTimeField);
		
		JLabel label_88 = new JLabel("限额后投注比例 %");
		label_88.setBounds(578, 410, 126, 26);
		//add(label_88);
		
		limitPercentField = new JTextField();
		limitPercentField.setColumns(10);
		limitPercentField.setBounds(720, 410, 66, 21);
		//add(limitPercentField);
		
		
		saveButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				
				
				String str = sideMinTextField.getText();
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"过滤赔率低于输入不正确");
					return;
				}
				
				str = sumMinTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"过滤对比赔率低于输入不正确");
					return;
				}
				
				str = sideMaxTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"过滤赔率高于输入不正确");
					return;
				}
				
				
				str = sumMaxTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"过滤对比赔率高于输入不正确");
					return;
				}
				
				
				
				
				str = hgPs38RQAmountTextField.getText();
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入皇冠正确投注金额");
					return;
				}
				
				str = hgISNRQAmountTextField.getText();
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入皇冠正确投注金额");
					return;
				}
				
				
				
				str = hgPs38DXAmountTextField.getText();
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入皇冠正确投注金额");
					return;
				}
				
				str = hgISNDXAmountTextField.getText();
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入皇冠正确投注金额");
					return;
				}
				
				
				str = ps38RQPercentTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的投注金额");
					return;
				}
				
				str = isnRQPercentTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的投注金额");
					return;
				}
				
				str = ps38DXPercentTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的投注金额");
					return;
				}
				
				str = isnDXPercentTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的投注金额");
					return;
				}
				
				
				str = ps38RQAmountTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的投注比例");
					return;
				}
				
				str = isnRQAmountTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的投注比例");
					return;
				}
				
				str = ps38DXAmountTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的投注比例");
					return;
				}
				
				str = isnDXAmountTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的投注比例");
					return;
				}
				
				
				str = betoddTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的利润设置");
					return;
				}
				
				
				
				str = reBetTimeTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的补单时间");
					return;
				}
				
				
				
				str = delayBetTimeTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的投注延时");
					return;
				}
				
				
				str = refreshDelayBetTimeTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的刷水后投注延时");
					return;
				}
				
				str = manualBetSuccessTimeTextField.getText();
				
				
				
				
				
				
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的手动投注成功间隔时间");
					return;
				}
				
				
				str = maxdvalueTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的盘口相差范围");
					return;
				}
				
				str = dvaluelimitTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的手数差值过滤");
					return;
				}
				
				str = specialMinRatioTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的特殊投注最低水位值");
				}
				
				str = specialSecondMinRatioTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的第二手投注最低水位值");
				}
				
				str = specialDXQMinRatioTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的特殊大小球投注最低水位值");
				}

				
				str = emailRQDvalueTextField.getText();
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的让球邮件差值");
				}
				str = emailDQDvalueTextField.getText();
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的大小邮件差值");
				}
				
				str = emailXQDvalueTextField.getText();
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的小球邮件差值");
				}
				
				
				str = beforeGameTimeFilterTextField.getText();
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的时间过滤值");
				}
				
				
				str = betDownGoldTextField.getText();
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的下盘投注金额");
				}
				
				str = specialBetAmountTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的特殊投注金额");
				}
				
				str = specialSecondBetAmountTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的第二手投注金额");
				}
				
				str = specialDXQBetAmountTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的特殊大小球投注金额");
				}
				
				
				str = specialBetIntervalTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的特殊投注金额");
				}
				
				str = specialDXQMinBetTextField.getText();
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null, "请输入正确的大小球起投手数");
				}
				
				
				
				str = receiveDataIntervalField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确同场次收数据间隔时间");
					return;
				}
				
				
				str = receiveDataIntervalField1.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确不同场次收数据间隔时间");
					return;
				}
				
				
				str = betlimitField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的手数限制");
					return;
				}
				
				str = startBetGoldField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的PS38起投金额");
					return;
				}
				
				
				str = startBetGoldFieldHg.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的HG盘口起投金额");
					return;
				}
				
				str = dxStartBetGoldFieldHg.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的HG大小起投金额");
					return;
				}
				
				str = forbidTimeStTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的禁止投注时间");
					return;
				}

				str = forbidTimeEdTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的禁止投注时间");
					return;
				}				
				
				
				str = hgMaxBetTextField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"请输入正确的皇冠最大投注金额");
					return;
				}
				
				
				str = danshiMaxTimeField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"过滤时间输入错误，请检查");
					return;
				}
				
				str = danshiMinTimeField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"过滤时间输入错误，请检查");
					return;
				}
				
				
				
				str = limitPercentField.getText();
				
				if(!Common.isNum(str)) {
					JOptionPane.showMessageDialog(null,"限额后投注比例输入错误，请检查");
					return;
				}
				
				
				if(savebetparamstofile()) {
					JOptionPane.showMessageDialog(null,"保存设置成功");
					
					
					
					sideMinodd = Double.parseDouble(sideMinTextField.getText());
					sumMinodd = Double.parseDouble(sumMinTextField.getText());
					sideMaxodd = Double.parseDouble(sideMaxTextField.getText());
					sumMaxodd = Double.parseDouble(sumMaxTextField.getText());
					
					
					
					hgPS38RQBetAmount = Integer.parseInt(hgPs38RQAmountTextField.getText());
					hgPS38DXBetAmount = Integer.parseInt(hgPs38DXAmountTextField.getText());
					
					ps38RQAmount = Double.parseDouble(ps38RQAmountTextField.getText());
					ps38DXAmount = Double.parseDouble(ps38DXAmountTextField.getText());
					ps38RQPercent = Double.parseDouble(ps38RQPercentTextField.getText());
					ps38DXPercent = Double.parseDouble(ps38DXPercentTextField.getText());
					
					
					setHgISNRQBetAmount(Integer.parseInt(hgISNRQAmountTextField.getText()));
					setIsnRQPercent(Double.parseDouble(isnRQPercentTextField.getText()));
					setIsnRQAmount(Double.parseDouble(isnRQAmountTextField.getText()));
					setHgISNDXBetAmount(Integer.parseInt(hgISNDXAmountTextField.getText()));
					setIsnDXPercent(Double.parseDouble(isnDXPercentTextField.getText()));
					setIsnDXAmount(Double.parseDouble(isnDXAmountTextField.getText()));
					
					betodd = Double.parseDouble(betoddTextField.getText());
					
					rebettime = Integer.parseInt(reBetTimeTextField.getText());
					
					
					delaybettime = Integer.parseInt(delayBetTimeTextField.getText());
					
					refreshdelaybettime = Integer.parseInt(refreshDelayBetTimeTextField.getText());
					
					manualBetSuccessTime = Integer.parseInt(manualBetSuccessTimeTextField.getText());
					
					maxdvalue = Double.parseDouble(maxdvalueTextField.getText());
					
					
					dvaluelimit = Integer.parseInt(dvaluelimitTextField.getText());
					
					specialMinRatio = Double.parseDouble(specialMinRatioTextField.getText());
					
					specialSecondMinRatio = Double.parseDouble(specialSecondMinRatioTextField.getText());
					
					specialDXQMinRatio = Double.parseDouble(specialDXQMinRatioTextField.getText());
					

					emailRQDvalue = Integer.parseInt(emailRQDvalueTextField.getText());
					emailDQDvalue = Integer.parseInt(emailDQDvalueTextField.getText());
					emailXQDvalue = Integer.parseInt(emailXQDvalueTextField.getText());

					beforeGameTimeFilter = Integer.parseInt(beforeGameTimeFilterTextField.getText());
					
					betDownGold = Integer.parseInt(betDownGoldTextField.getText());
					
					specialBetAmount = Integer.parseInt(specialBetAmountTextField.getText());
					
					specialSecondBetAmount = Integer.parseInt(specialSecondBetAmountTextField.getText());
					
					specialDXQBetAmount = Integer.parseInt(specialDXQBetAmountTextField.getText());

					specialBetInterval = Integer.parseInt(specialBetIntervalTextField.getText());
					
					specialDXQMinBet = Integer.parseInt(specialDXQMinBetTextField.getText());

					receiveDataInterval = Integer.parseInt(receiveDataIntervalField.getText());
					
					notsamematchReceiveDataInterval = Integer.parseInt(receiveDataIntervalField1.getText());
					
					betcountLimit = Integer.parseInt(betlimitField.getText());
					
					startBetGold = Integer.parseInt(startBetGoldField.getText());
					startBetGoldHg = Integer.parseInt(startBetGoldFieldHg.getText());
					
					dxStartBetGoldHg = Integer.parseInt(dxStartBetGoldFieldHg.getText());
				
					hgmaxbet = Integer.parseInt(hgMaxBetTextField.getText());
					
					
					forbidTimest = Integer.parseInt(forbidTimeStTextField.getText());
					forbidTimeed = Integer.parseInt(forbidTimeEdTextField.getText());
					
					danshiMaxTime = Integer.parseInt(danshiMaxTimeField.getText());
					danshiMinTime = Integer.parseInt(danshiMinTimeField.getText());
					
					limitPercent = Integer.parseInt(limitPercentField.getText());
					
					
					if(NegativeRatioClient.betCtrMng != null) {
						NegativeRatioClient.betCtrMng.updateBetAdyTable();
					}
					
					
					
				}else {
					JOptionPane.showMessageDialog(null,"保存设置失败");
					
					
				}
				
			}
		});
		
		
		recoverbetparamsfromfile();

	}
	


	
	
	

	
	public int gethgPS38RQBetAmount() {
		return hgPS38RQBetAmount;
	}
	
	public int gethgPS38DXBetAmount() {
		return hgPS38DXBetAmount;
	}

	public double getps38RQAmount() {
		return ps38RQAmount;
	}
	
	public double getps38DXAmount() {
		return ps38DXAmount;
	}
	
	public double getps38RQPercent() {
		return ps38RQPercent;
	}
	
	
	public double getps38DXPercent() {
		return ps38DXPercent;
	}
	

	public double getbetodd() {
		return betodd;
	}
	
	public boolean getbetdanshi() {
		return bbetdanshi;
	}
	
	public boolean getbetrunning() {
		return bbetrunning;
	}
	
	public boolean getAutoBet() {
		return autoBet;
	}
	
	public boolean getMatchFilter() {
		return bmatchFilter;
	}
	
	public boolean getbps38RQBetAmount() {
		return bps38RQBetAmount;
	}
	
	public boolean getbps38DXBetAmount() {
		return bps38DXBetAmount;
	}

	public int getrebettime() {
		return rebettime;
	}
	
	
	public int getdelaybettime() {
		return delaybettime;
	}
	
	public int getrefreshdelaybettime() {
		return refreshdelaybettime;
	}
	
	public void recoverbetparamsfromfile(){
		try{
			
			File file = new File("data" + "/sesttingparams.txt");
			
			if(!file.exists()){
				return;
			}

			BufferedReader freader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
			
			
			
			
			
			String str = "";
			
			int linenum = 0;

			while ((str = freader.readLine()) != null) {
				

				

				if(linenum == 0) {
					
					if(Common.isNum(str)) {
						hgPS38RQBetAmount = Integer.parseInt(str);
						hgPs38RQAmountTextField.setText(str);
					}

				}else if(linenum == 1) {
					if(Common.isNum(str)) {
						ps38RQPercent = Double.parseDouble(str);
						ps38RQPercentTextField.setText(str);
					}
				}else if(linenum == 2) {
					if(Common.isNum(str)) {
						ps38RQAmount = Double.parseDouble(str);
						ps38RQAmountTextField.setText(str);
					}
				}else if(linenum == 3) {
					
						bps38RQBetAmount = Boolean.parseBoolean(str);
						ps38RQBetAmountCheckBox.setSelected(bps38RQBetAmount);
					
				}else if(linenum == 4) {
					if(Common.isNum(str)) {
						betodd = Double.parseDouble(str);
						betoddTextField.setText(str);
					}
				}else if(linenum == 5) {
					autoBet = Boolean.parseBoolean(str);
					autoBetCheckBox.setSelected(autoBet);
				}else if(linenum == 6) {
					bmatchFilter = Boolean.parseBoolean(str);
					matchFilterCheckBox.setSelected(bmatchFilter);
				}else if(linenum == 7) {
					receiveDataInterval = Integer.parseInt(str);
					receiveDataIntervalField.setText(str);
				}else if(linenum == 8) {
					if(Common.isNum(str)) {
						sideMinodd = Double.parseDouble(str);
						sideMinTextField.setText(str);
					}
				}else if(linenum == 9) {
					if(Common.isNum(str)) {
						sumMinodd = Double.parseDouble(str);
						sumMinTextField.setText(str);
					}
				}else if(linenum ==10) {
					if(Common.isNum(str)) {
						sideMaxodd = Double.parseDouble(str);
						sideMaxTextField.setText(str);
					}
				}else if(linenum == 11) {
					if(Common.isNum(str)) {
						sumMaxodd = Double.parseDouble(str);
						sumMaxTextField.setText(str);
					}
				}else if(linenum == 12) {
					betHalf = Boolean.parseBoolean(str);
					betHalfCheckBox.setSelected(betHalf);
				}else if(linenum == 13) {
					betWhole = Boolean.parseBoolean(str);
					betWholeCheckBox.setSelected(betWhole);
				}else if(linenum == 14) {
					notsamematchReceiveDataInterval = Integer.parseInt(str);
					receiveDataIntervalField1.setText(str);
				}else if(linenum == 15) {
					ignoreWarn = Boolean.parseBoolean(str);
					ignoreWarnCheckBox.setSelected(ignoreWarn);
				}else if(linenum == 16) {
					if(Common.isNum(str)) {
						rebettime = Integer.parseInt(str);
						reBetTimeTextField.setText(str);
					}
				}else if(linenum == 17) {
					if(Common.isNum(str)) {
						delaybettime = Integer.parseInt(str);
						delayBetTimeTextField.setText(str);
					}
				}else if(linenum == 18) {
					betcountLimit = Integer.parseInt(str);
					betlimitField.setText(str);
				}else if(linenum == 19) {
					startBetGold = Integer.parseInt(str);
					startBetGoldField.setText(str);
				}else if(linenum == 20) {
					hgmaxbet = Integer.parseInt(str);
					hgMaxBetTextField.setText(str);
				}else if(linenum == 21) {
					forbidTimest = Integer.parseInt(str);
					forbidTimeStTextField.setText(str);
				}else if(linenum == 22) {
					forbidTimeed = Integer.parseInt(str);
					forbidTimeEdTextField.setText(str);
				}else if(linenum == 23) {
					bbetdanshi = Boolean.parseBoolean(str);
					betdanshiCheckBox.setSelected(bbetdanshi);
				}else if(linenum == 24) {
						bbetrunning = Boolean.parseBoolean(str);
						betrunningCheckBox.setSelected(bbetrunning);
				}else if(linenum == 25) {
					bbetpankou = Boolean.parseBoolean(str);
					betpankouCheckBox.setSelected(bbetpankou);
				}else if(linenum == 26) {
						bbetdq = Boolean.parseBoolean(str);
						betdqCheckBox.setSelected(bbetdq);
				}else if(linenum == 27) {
					if(Common.isNum(str)) {
						refreshdelaybettime = Integer.parseInt(str);
						refreshDelayBetTimeTextField.setText(str);
					}
				}else if(linenum == 28) {
					if(Common.isNum(str)) {
						manualBetSuccessTime = Integer.parseInt(str);
						manualBetSuccessTimeTextField.setText(str);
					}
				}else if(linenum == 29) {
					if(Common.isNum(str)) {
						maxdvalue = Double.parseDouble(str);
						maxdvalueTextField.setText(str);
					}
				}else if(linenum == 30) {
					if(Common.isNum(str)) {
						dvaluelimit = Integer.parseInt(str);
						dvaluelimitTextField.setText(str);
					}
				}else if(linenum == 31) {
					if(Common.isNum(str)) {
						specialMinRatio = Double.parseDouble(str);
						specialMinRatioTextField.setText(str);
					}
				}else if(linenum == 32) {
					if(Common.isNum(str)) {
						specialBetAmount = Integer.parseInt(str);
						specialBetAmountTextField.setText(str);
					}
				}else if(linenum == 33) {
					if(Common.isNum(str)) {
						specialBetInterval = Integer.parseInt(str);
						specialBetIntervalTextField.setText(str);
					}
				}else if(linenum == 34) {
					if(Common.isNum(str)) {
						specialDXQMinBet = Integer.parseInt(str);
						specialDXQMinBetTextField.setText(str);
					}
				}else if(linenum == 35) {
					if(Common.isNum(str)) {
						specialDXQBetAmount = Integer.parseInt(str);
						specialDXQBetAmountTextField.setText(str);
					}
				}else if(linenum == 36) {
					if(Common.isNum(str)) {
						specialDXQMinRatio = Double.parseDouble(str);
						specialDXQMinRatioTextField.setText(str);
					}
				}else if(linenum == 37) {
					if(Common.isNum(str)) {
						specialSecondMinRatio = Double.parseDouble(str);
						specialSecondMinRatioTextField.setText(str);
					}
				}else if(linenum == 38) {
					if(Common.isNum(str)) {
						specialSecondBetAmount = Integer.parseInt(str);
						specialSecondBetAmountTextField.setText(str);
					}
				}else if(linenum == 39) {
					if(Common.isNum(str)) {
						danshiMaxTime = Integer.parseInt(str);
						danshiMaxTimeField.setText(str);
					}
				}else if(linenum == 40) {
					if(Common.isNum(str)) {
						danshiMinTime = Integer.parseInt(str);
						danshiMinTimeField.setText(str);
					}
				}else if(linenum == 41) {
					if(Common.isNum(str)) {
						limitPercent = Integer.parseInt(str);
						limitPercentField.setText(str);
					}
				}else if(linenum == 42) {
					if(Common.isNum(str)) {
						emailRQDvalue = Integer.parseInt(str);
						emailRQDvalueTextField.setText(str);
					}
				}else if(linenum == 43) {
					if(Common.isNum(str)) {
						emailDQDvalue = Integer.parseInt(str);
						emailDQDvalueTextField.setText(str);
					}
				}else if(linenum == 44) {
					if(Common.isNum(str)) {
						beforeGameTimeFilter = Integer.parseInt(str);
						beforeGameTimeFilterTextField.setText(str);
					}
				}else if(linenum == 45) {
					startBetGoldHg = Integer.parseInt(str);
					startBetGoldFieldHg.setText(str);
				}else if(linenum == 46) {
					dxStartBetGoldHg = Integer.parseInt(str);
					dxStartBetGoldFieldHg.setText(str);
				}else if(linenum == 47) {
					if(Common.isNum(str)) {
						emailXQDvalue = Integer.parseInt(str);
						emailXQDvalueTextField.setText(str);
					}
				}else if(linenum == 48) {
					if(Common.isNum(str)) {
						hgPS38DXBetAmount = Integer.parseInt(str);
						hgPs38DXAmountTextField.setText(str);
					}
				}else if(linenum == 49) {
					if(Common.isNum(str)) {
						ps38DXPercent = Double.parseDouble(str);
						ps38DXPercentTextField.setText(str);
					}
				}else if(linenum == 50) {
					if(Common.isNum(str)) {
						ps38DXAmount = Double.parseDouble(str);
						ps38DXAmountTextField.setText(str);
					}
				}else if(linenum == 51) {
					
					bps38DXBetAmount = Boolean.parseBoolean(str);
					ps38DXBetAmountCheckBox.setSelected(bps38DXBetAmount);
				
				}else if(linenum == 52) {
					if(Common.isNum(str)) {
						setHgISNRQBetAmount(Integer.parseInt(str));
						hgISNRQAmountTextField.setText(str);
					}
				}else if(linenum == 53) {
					if(Common.isNum(str)) {
						setIsnRQPercent(Double.parseDouble(str));
						isnRQPercentTextField.setText(str);
					}
				}else if(linenum == 54) {
					if(Common.isNum(str)) {
						setIsnRQAmount(Double.parseDouble(str));
						isnRQAmountTextField.setText(str);
					}
				}else if(linenum == 55) {
					if(Common.isNum(str)) {
						setHgISNDXBetAmount(Integer.parseInt(str));
						hgISNDXAmountTextField.setText(str);
					}
				}else if(linenum == 56) {
					if(Common.isNum(str)) {
						setIsnDXPercent(Double.parseDouble(str));
						isnDXPercentTextField.setText(str);
					}
				}else if(linenum == 57) {
					if(Common.isNum(str)) {
						setIsnDXAmount(Double.parseDouble(str));
						isnDXAmountTextField.setText(str);
					}
				}else if(linenum == 58) {					
					bISNRQBetAmount = Boolean.parseBoolean(str);
					isnRQBetAmountCheckBox.setSelected(bISNRQBetAmount);				
				}else if(linenum == 59) {					
					bISNDXBetAmount = Boolean.parseBoolean(str);
					isnDXBetAmountCheckBox.setSelected(bISNDXBetAmount);				
				}else if(linenum == 60) {
					bbetxq = Boolean.parseBoolean(str);
					betxqCheckBox.setSelected(bbetxq);
				}else if(linenum == 61) {
					betDown = Boolean.parseBoolean(str);
					betDownCheckBox.setSelected(betDown);
				}else if(linenum == 62) {
					if(Common.isNum(str)) {
						betDownGold = Integer.parseInt(str);
						betDownGoldTextField.setText(str);
					}
				}
				
				

				
				linenum++;

			}
			
			
			
			
			if(null != freader){
				freader.close();
			}
			
		}catch(Exception e){
			e.printStackTrace();
		}
	}
	
	
	public boolean savebetparamstofile(){
		try{
			
			File filefolder = new File("data/");
			
			if(!filefolder.exists()){
				filefolder.mkdir();
			}
			
			File file = new File("data/"+ "sesttingparams.txt");

			if(!file.exists()){	
				file.createNewFile();
			}
			
			BufferedWriter fwlocal = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, false), "UTF-8"));

			
			
				
			
			String str = hgPs38RQAmountTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = ps38RQPercentTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = ps38RQAmountTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = Boolean.toString(ps38RQBetAmountCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = betoddTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = Boolean.toString(autoBetCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			
			str = Boolean.toString(matchFilterCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			
			str = receiveDataIntervalField.getText();

			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();

			
	
			
			str = sideMinTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = sumMinTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = sideMaxTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = sumMaxTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();

			
			str = Boolean.toString(betHalfCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = Boolean.toString(betWholeCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = receiveDataIntervalField1.getText();

			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = Boolean.toString(ignoreWarnCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = reBetTimeTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = delayBetTimeTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = betlimitField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = startBetGoldField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = hgMaxBetTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();	
			
			
			
			str = forbidTimeStTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();	
			
			str = forbidTimeEdTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();	
			
			
			
			str = Boolean.toString(betdanshiCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = Boolean.toString(betrunningCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			
			str = Boolean.toString(betpankouCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = Boolean.toString(betdqCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			
			str = refreshDelayBetTimeTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			
			str = manualBetSuccessTimeTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = maxdvalueTextField.getText();
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = dvaluelimitTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = specialMinRatioTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = specialBetAmountTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = specialBetIntervalTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = specialDXQMinBetTextField.getText();
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = specialDXQBetAmountTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = specialDXQMinRatioTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = specialSecondMinRatioTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = specialSecondBetAmountTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = danshiMaxTimeField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = danshiMinTimeField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = limitPercentField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			
			str = emailRQDvalueTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = emailDQDvalueTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = beforeGameTimeFilterTextField.getText();
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = startBetGoldFieldHg.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = dxStartBetGoldFieldHg.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = emailXQDvalueTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = hgPs38DXAmountTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = ps38DXPercentTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = ps38DXAmountTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = Boolean.toString(ps38DXBetAmountCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = hgISNRQAmountTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = isnRQPercentTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = isnRQAmountTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = hgISNDXAmountTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = isnDXPercentTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			
			str = isnDXAmountTextField.getText();
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = Boolean.toString(isnRQBetAmountCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = Boolean.toString(isnDXBetAmountCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			str = Boolean.toString(betxqCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			str = Boolean.toString(betDownCheckBox.isSelected());
			
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			

			str = betDownGoldTextField.getText();
			fwlocal.append(str);
			fwlocal.newLine();
			fwlocal.flush();
			
			
			
			
			
			fwlocal.close();
			
			
			

			

			return true;
			
			
			
		}catch(Exception e){
			e.printStackTrace();
			
		}
		
		return false;
	}

	/**
	 * @return the hgISNRQBetAmount
	 */
	public int getHgISNRQBetAmount() {
		return hgISNRQBetAmount;
	}

	/**
	 * @param hgISNRQBetAmount the hgISNRQBetAmount to set
	 */
	public void setHgISNRQBetAmount(int hgISNRQBetAmount) {
		this.hgISNRQBetAmount = hgISNRQBetAmount;
	}

	/**
	 * @return the isnRQAmount
	 */
	public double getIsnRQAmount() {
		return isnRQAmount;
	}

	/**
	 * @param isnRQAmount the isnRQAmount to set
	 */
	public void setIsnRQAmount(double isnRQAmount) {
		this.isnRQAmount = isnRQAmount;
	}

	/**
	 * @return the isnRQPercent
	 */
	public double getIsnRQPercent() {
		return isnRQPercent;
	}

	/**
	 * @param isnRQPercent the isnRQPercent to set
	 */
	public void setIsnRQPercent(double isnRQPercent) {
		this.isnRQPercent = isnRQPercent;
	}

	/**
	 * @return the hgISNDXBetAmount
	 */
	public int getHgISNDXBetAmount() {
		return hgISNDXBetAmount;
	}

	/**
	 * @param hgISNDXBetAmount the hgISNDXBetAmount to set
	 */
	public void setHgISNDXBetAmount(int hgISNDXBetAmount) {
		this.hgISNDXBetAmount = hgISNDXBetAmount;
	}

	/**
	 * @return the isnDXAmount
	 */
	public double getIsnDXAmount() {
		return isnDXAmount;
	}

	/**
	 * @param isnDXAmount the isnDXAmount to set
	 */
	public void setIsnDXAmount(double isnDXAmount) {
		this.isnDXAmount = isnDXAmount;
	}

	/**
	 * @return the isnDXPercent
	 */
	public double getIsnDXPercent() {
		return isnDXPercent;
	}

	/**
	 * @param isnDXPercent the isnDXPercent to set
	 */
	public void setIsnDXPercent(double isnDXPercent) {
		this.isnDXPercent = isnDXPercent;
	}
	
	
	
	
	
	

}
